//
//  initContent.m
//  demo2
//
//  Created by 张仕儒 on 2021/7/7.
//

#import "initContent.h"
#import "mainViewController.h"
@interface initContent()

@property (strong) NSWindow *mainWindow;
@property (strong) dispatch_queue_t handleQueue;
@property (nonatomic, strong) mainViewController *mainVC;

@end

@implementation initContent

- (instancetype)initWithMainWindow:(NSWindow *)window {
    self = [super init];
    if (self) {
        self.mainWindow = window;
        self.handleQueue = dispatch_queue_create("com.tencent.connet", DISPATCH_QUEUE_SERIAL);
    }
    return self;
}

// 初始化
- (void)initViewAndData {
//    NSLog(@"加载中...");
    if(!_mainVC) {
        _mainVC = [[mainViewController alloc]initWithNibName:[mainViewController className] bundle:nil];
    }
    self.mainWindow.contentView.wantsLayer = YES;
    self.mainWindow.opaque = NO;
    self.mainWindow.movableByWindowBackground = YES;
    self.mainWindow.styleMask &= ~NSWindowStyleMaskResizable;
    self.mainWindow.contentViewController = self.mainVC;
}

//- (mainViewController *)mainVC {
//    if(!_mainVC) {
//        _mainVC = [[mainViewController alloc]initWithNibName:[mainViewController className] bundle:nil];
//    }
//    return _mainVC;
//}



@end
